CONFIG += qt \
    app \
    debug
CONFIG(unix) { 
    LIBS += -lsqlite \
        -lxerces-c \
        -lcrypto++ \
        -lsqlite3
    CONFIG(debug):LIBS += -lcppunit
}
else:

# TODO add libs
CONFIG(unix):INCLUDEPATH += /usr/include
else:

# TODO add includes
DESTDIR = bin
TEMPLATE = app
TARGET = tree
INCLUDEPATH += common \
    db \
    genealogy_tree \
    test \
    tree \
    ui
HEADERS += db/GenealogyTreeUtils.h \
    conf.h \ # common:
    common/AES.h \
    common/Base64.h \
    common/Date.h \
    common/DateSerializer.h \
    common/Exception.h \
    common/FileNotFoundException.h \
    common/FindAll.h \
    common/HashUtility.h \
    common/IllegalArgumentException.h \
    common/NullPointerException.h \
    common/ObjectSerializer.h \
    common/ParseException.h \
    common/RuntimeException.h \
    common/Throwable.h \
    common/XmlSerializer.h \
    common/XmlStringTranscoder.h \
    common/TreeAllocator.h \ # db:
    db/DataSource.h \
    db/DataSourceException.h \
    db/DataSourceManager.h \
    db/SqliteDataSource.h \ # genealogy_tree:
    genealogy_tree/Gender.h \
    genealogy_tree/GenealogyTree.h \
    genealogy_tree/GenealogyTreeException.h \
    genealogy_tree/Person.h \
    genealogy_tree/PersonSerializer.h \
    genealogy_tree/Photo.h \
    genealogy_tree/PersonType.h \ # tree:
    tree/InnerTreeIterator.h \
    tree/Tree.h \
    tree/TreeException.h \
    tree/TreeIterator.h \
    tree/TreeNode.h \
    tree/TreeSerializer.h \ # ui:
    ui/MainWindow.h \
    ui/Link.h \
    ui/Node.h \
    ui/AddPersonDialog.h \
    ui/AboutPerson.h \
    ui/Diagram.h \
    ui/TreeLoadDialog.h \
    ui/PersonWidget.h \
    ui/FindDialog.h
CONFIG(debug):HEADERS += test/AllTests.h \
    test/DateTest.h \
    test/FindAllTest.h \
    test/PersonTest.h \
    test/TreeTest.h \
    test/SqliteDataSourceTest.h
SOURCES += genealogy_tree/Person.cpp \
    db/GenealogyTreeUtils.cpp \
    main.cpp \ # common:
    common/AES.cpp \
    common/Base64.cpp \
    common/Date.cpp \
    common/DateSerializer.cpp \
    common/HashUtility.cpp \
    common/XmlSerializer.cpp \
    db/DataSourceManager.cpp \
    db/SqliteDataSource.cpp \ # genealogy_tree:
    genealogy_tree/GenealogyTree.cpp \
    genealogy_tree/PersonSerializer.cpp \
    genealogy_tree/Photo.cpp \ # ui:
    ui/MainWindow.cpp \
    ui/Link.cpp \
    ui/Node.cpp \
    ui/AddPersonDialog.cpp \
    ui/AboutPerson.cpp \
    ui/Diagram.cpp \
    ui/TreeLoadDialog.cpp  \
    ui/PersonWidget.cpp \
    ui/FindDialog.cpp
FORMS += ui/MainWindow.ui \
    ui/AddPersonDialog.ui \
    ui/AboutPerson.ui \
    ui/TreeLoadDialog.ui \
    ui/PersonWidget.ui \
    ui/FindDialog.ui

# RESOURCES = ui/resources.qrc
CONFIG(debug):SOURCES += test/AllTests.cpp \
    test/DateTest.cpp \
    test/FindAllTest.cpp \
    test/PersonTest.cpp \
    test/TreeTest.cpp \
    test/SqliteDataSourceTest.cpp
